import service from '../utils/request'

export function fetchTeacherByCondition (data) {
    return service({
        url: '/teacher/select',
        method: 'post',
        data
    })
}
// 查询
export function fetchDepartmentList (data) {
    return service({
        url: '/major/select',
        method: 'post',
        data
    })
}

// 删除
export function deleteTeacher (params) {
    return service({
        url: `/teacher/${params}`,
        method: 'delete'
    })
}

// 更新
export function editTeacher (data) {
    return service({
        url: '/teacher',
        method: 'put',
        data
    })
}

export function addTeacher (data) {
    return service({
        url: '/teacher',
        method: 'post',
        data
    })
}